<title>ResourceLoadPriority Media Preload tests</title>

<script src="resources/common.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<script>
window.onmessage = function(message) {
  if (message.data.hasOwnProperty('Priority')) {
    window.onRequestPriorityUpdated(message.data['Priority']);
  }
  if (message.data.hasOwnProperty('Status')) {
    window.onRequestStatusChanged(message.data['Status']);
  }
}

// TODO: These tests should be moved to resource-load-priorities.html, and their
// timeout expectations be deleted when we support preloading the audio and
// video destinations. See crbug.com/977033 and
// https://github.com/w3c/preload/issues/97 for more information.

resource_load_priority_test(
  'preload/as-audio.html', kLow,
    'Preloaded audio files should be loaded with kLow priority');

resource_load_priority_test(
  'preload/as-video.html', kLow,
    'Preloaded videos should be loaded with kLow priority');
</script>
